from django.conf.urls import patterns, include, url

import os
from django.contrib import admin
from Godthaab_v1.Apps.Products import urls
admin.autodiscover()

SITE_ROOT = os.path.dirname(os.path.realpath(__file__))

PROJECT_ROOT = os.path.dirname(__file__)

urlpatterns = patterns('',
    (r'^$', 'Godthaab_v1.Apps.Products.views.index'),
    url(r'^admin/', include(admin.site.urls)),

    url(r'^staff/$', 'Godthaab_v1.Apps.Products.views.getStaff', name="staff"),
    url(r'^urls/$', 'Godthaab_v1.Apps.Products.views.getUrl', name="urls"),
    url(r'^products/$', 'Godthaab_v1.Apps.Products.views.products', name="products"),
    url(r'^products/fish/(?P<fishId>\d+)/$', 'Godthaab_v1.Apps.Products.views.getProductsByFish', name="productFish" ),
    url(r'^products/type/(?P<typeId>\d+)/$', 'Godthaab_v1.Apps.Products.views.getProductsByType', name="productType" ),
    #(r'^jobrequest/$', 'django.views.generic.simple.direct_to_template', {'template': 'jobrequest.html'} ),
    url(r'^job-request/$', 'Godthaab_v1.Apps.Products.views.getJobRequest', name="jobRequest" ),
    (r'^gallery/$', 'django.views.generic.simple.direct_to_template', {'template': 'gallery.html'} ),
    url(r'^job-request/thanks/$', 'Godthaab_v1.Apps.Products.views.getThanks', name="thanks" ),


    #(r'^$', 'Godthaab_v1.Apps.Newsfeed.views.index'), {'document_root': 'C:\Python27\site-packages\django\contrib\admin\static'},

    (r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': '%s\media' % PROJECT_ROOT}),

    (r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': '%s\static' % PROJECT_ROOT }),

    (r'^tiny_mce/(?P<path>.*)$', 'django.views.static.serve', {'document_root': 'C:/tinymce/jscripts/tiny_mce'}),

    (r'', include('django.contrib.flatpages.urls')),
)
